package cn.dengta.webapp.live.model;

import lombok.Getter;

/**
 * 直播连麦状态
 */
@Getter
public enum LiveInteractStatus {

	/** 直播状态：-3=主播关闭连麦功能；-2=拒绝连麦；-1=取消连麦；0=等待中；1=连麦中; 2=连麦结束 */
	LIVE_MIC_OFF(-3, "主播关闭连麦功能"),
	LIVE_MIC_REJECT(-2, "拒绝连麦"),
	LIVE_MIC_CANCEL(-1, "取消连麦"),
	LIVE_MIC_WAIT(0, "等待中"),
	LIVE_MIC_ING(1, "连麦中"),
	LIVE_MIC_END(2, "连麦结束");

	public final Integer value;
	String label;

	LiveInteractStatus(Integer value, String label) {
		this.value = value;
		this.label = label;
	}

	public static String getLabel(final int val) {
		for (LiveInteractStatus p : LiveInteractStatus.values()) {
			if (p.value == val) {
				return p.getLabel();
			}
		}
		return null;
	}

}
